import axios from "axios";
import api from "./api_address";
const http = axios.create({ baseURL: "https://apis.netstart.cn/mbcomic" });
const http2 = axios.create({ baseURL: "https://apis.netstart.cn/bcomic" });
http.interceptors.response.use(
    function (response) {
        return response.data;
    },
    function (error) {
        return Promise.reject(error);
    }
);
export const indexBanner = (data = {}) => {
    return http.get(api.banner, { params: data });
};
export const homeRecommend = (data = {}) => {
    return http.get(api.homeRecommend, { params: data });
};
export const kindCondition = (data = {}) => {
    return http.get(api.kindCondition, { params: data });
};
export const classPage = (data = {}) => {
    return http.get(api.classPage, { params: data });
};
export const homeHot = (data = {}) => {
    return http.get(api.homeHot, { params: data });
};
export const comicDetail = (data = {}) => {
    return http.get(api.comicDetail, { params: data });
};
export const reply = (data = {}) => {
    return http.get(api.reply, { params: data });
};
export const recommend = (data = {}) => {
    return http.get(api.recommend, { params: data });
};
export const getImageIndex = (data = {}) => {
    return http.get(api.getImageIndex, { params: data });
};
export const imageToken = (data = []) => {
    return http.get(api.imageToken, { params: data });
};
export const search = (data = []) => {
    return http2.get(api.search, { params: data });
};
